<extend name="Public/base"/>

<block name="style">
    <link rel="stylesheet" href="__STATIC__/plugins/data-tables/DT_bootstrap.css" />
</block>

<block name="body">

    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="fa fa-globe"></i>科目设置</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                        <a href="#portlet-config" data-toggle="modal" class="config"></a>
                        <a href="javascript:;" class="reload"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="table-toolbar">
                        <div class="btn-group">
                            <a class="btn green" href="{:U('addSubject')}">新 增</a>
                            <a class="btn green" href="javascript:;">删 除</a>
                            <a class="btn green" href="javascript:;">排序</a>
                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="sample">
                        <thead>
                        <tr>
                            <th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample .checkboxes" /></th>
                            <th>ID</th>
                            <th>科目名称</th>
                            <th>年级组</th>
                            <th>类别</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="_list" id="sub">
                            <tr class="odd gradeX">
                                <td><input class="ids checkboxes" type="checkbox" name="" id="" value="{$sub['sid']}"> </td>
                                <td>{$sub.sid}</td>
                                <td><a href="{:U('index?pid='.$channel['id'])}">{$sub.subject_name}</a></td>
                                <td>{$sub.rules}</td>
                                <td><if condition="$sub.type_id eq 1">
                                     必选<else/>可选
                                </if></td>
                                <td>
                                    <a title="编辑" href="{:U('addSubject?sid='.$sub['sid'].'&pid=1')}">编辑</a>
                                    <a class="confirm ajax-get" title="删除" href="{:U('subdel?sid='.$sub['sid'])}">删除</a>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>

                    <div class="page">
                        {$_page}
                    </div>
                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
</block>

<block name="script">
    <!-- BEGIN PAGE LEVEL PLUGINS -->
    <script type="text/javascript" src="__STATIC__/plugins/data-tables/jquery.dataTables.js"></script>
    <script type="text/javascript" src="__STATIC__/plugins/data-tables/DT_bootstrap.js"></script>
    <!-- END PAGE LEVEL PLUGINS -->
    <!-- BEGIN PAGE LEVEL SCRIPTS -->
    <script src="__STATIC__/scripts/app.js"></script>
    <script src="__STATIC__/scripts/table-managed.js"></script>
    <script>
        jQuery(document).ready(function() {
            App.init();
            TableManaged.init();
        });
    </script>
</block>